<!--
 * @Author: your name
 * @Date: 2021-06-16 14:06:30
 * @LastEditTime: 2021-06-16 14:20:06
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \vueDemo\06-列表渲染.html
-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>first</title>
    <!-- 引入vue.js -->
    <script src="https://cdn.jsdelivr.net/npm/vue@2.6.14/dist/vue.js"></script>
<style> 
    .ul_con{
        list-style-type: none;
        margin: 0;
        padding: 0;
        background-color: blueviolet;

    }
</style>
</head>
<body>
    <div id="div">
        <ul :class = "cls">
            <li v-for="name in names">{{name}}</li>
            <li v-for="value in student">{{value}}</li>
            <!-- <li v-for="age in ages">{{age}}</li> -->
        </ul>
        
    </div>
    <script>
        new Vue({
            el:"#div",
            data:{
                names:["张三","李四","王五"],
                student:{
                    name:"张三",
                    age:23,
                },
                 cls:"ul_con",
            }
        });
    </script>
</body>
</html>
